package com.css.crm.service;

import java.util.List;

import com.css.crm.exception.SystemException;
import com.css.crm.vo.CustomerAddressVo;
import com.css.crm.vo.CustomerDiscountVo;
import com.css.crm.vo.CustomerEmailVo;
import com.css.crm.vo.CustomerTelephoneVo;
import com.css.crm.vo.CustomerVo;

/**
 * Customer service interface
 * 
 * @author AIS
 */
public interface CustomerService extends BaseService {

	/**
	 * get customer info by id
	 * 
	 * @param custId
	 * @return
	 */
	CustomerVo getCustomerByCustId(String custId) throws SystemException;

	/**
	 * update customer info
	 * 
	 * @param customer
	 */
	void updateCustomer(CustomerVo customer) throws SystemException;

	/**
	 * update customer cancelled
	 * 
	 * @param customer
	 */
	void updateCustomerCancelled(CustomerVo customer) throws SystemException ;
	
	/**
	 * search customer by solr search engine
	 * 
	 * @param keyWord
	 * @return
	 * @throws SystemException
	 */
	List<CustomerVo> searchCustomerBySolr(String keyWord) throws SystemException;

	/**
	 * create new customer
	 * 
	 * @param customer
	 * @return
	 * @throws SystemException
	 */
	int createCustomer(CustomerVo customer) throws SystemException;

	/**
	 * validation of customer info
	 * 
	 * @param customer
	 * @throws SystemException
	 */
	boolean validateCustomer(CustomerVo customer);

	/**
	 * get default discount of customer
	 * 
	 * @param customerId
	 * @return
	 */
	CustomerDiscountVo getDefaultDiscount(String customerId);

	/**
	 * get contact email of customer
	 * 
	 * @param customerId
	 * @return
	 */
	CustomerEmailVo getContactEmail(String customerId);

	/**
	 * get contact address of customer
	 * 
	 * @param customerId
	 * @return
	 */
	CustomerAddressVo getContactAddress(String customerId);

	/**
	 * get contact telephone of customer
	 * 
	 * @param customerId
	 * @return
	 */
	CustomerTelephoneVo getContactTelephone(String customerId);

	/**
	 * get customer related information
	 * 
	 * @param vo
	 * @return
	 */
	CustomerVo setCustomerList(CustomerVo customer) throws SystemException;

	/**
	 * get generated customer id by original country code
	 * 
	 * @param oriCtryCde
	 * @return
	 * @throws SystemException
	 */
	String getNextCustId(Long oriCtryCde) throws SystemException;
}
